﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DotNet.Random.Int
{
    /// <summary>
    /// int类型 随机基类，继承于抽象类IntAbsRandService
    /// </summary>
    public class IntRandService : DotNet.Random.Abstract.IntAbsRandService
    {
        /// <summary>
        /// Rands this instance.
        /// 随机生成数字方法
        /// 映射到虚方法中，扩展时，可重写
        /// </summary>
        /// <returns>
        /// 返回int类型
        /// </returns>
        public override int Rand()
        {
            var res = this.Build.Rand(this.Serial, 1);
            return res.FirstOrDefault();
        }
    }
}
